/*
 * dom帮助函数
 * @Author: ljb
 * @Date: 2019-01-02 10:07:35
 * @Last Modified by: kanglin
 * @Last Modified time: 2019-01-22 10:09:14
 */

/**
 * 设置当前节点高度为屏幕可视高度
 * @param  {Object} elem {节点对象}
 */
export function setMinHeightToInnerHeight(elem) {
	elem.style.height = `${window.innerHeight}px`;
}

/**
 * 动态import后台设置的主题样式文件
 * @param  {String} styleName {需要引入的样式文件所在的文件夹名称}
 */
export function importStyle(styleName) { 
	let style_name = 'default';
	if (styleName) style_name = styleName;
	console.log(style_name)
	import(`src/assets/theme/${style_name}/index.less`).catch((error)=>{
		console.warn(error.message);
	})
}
